package consumer.strategy;

import java.util.List;
import java.util.Random;

/**
 * @ClassName RandomRouterStrategy
 * @Description
 * @Author Jingxiao.Ye
 * @Date 2022/1/16 下午5:02
 * @Version V1.0
 * @Since JDK 11
 */
public class RandomRouterStrategy implements RouterStrategy {
    @Override
    public String getRouter(List<String> urls) {
        return urls.get(new Random().nextInt(urls.size()));
    }
}
